package com.cn.xiaonuo.slbfinances.slpabank.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.slbfinances.slpabank.entity.SlPaMember;
import com.cn.xiaonuo.slbfinances.slpabank.service.IPaMemberService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PaMemberController {
    @Resource
    private IPaMemberService paMemberService;

    @ApiOperation(value = "平安银行--平安用户管理", notes = "平安银行--平安用户管理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true),
            @ApiImplicitParam(name = "pageSize", value = "长度", required = true)
    })
    @RequestMapping(value = "api/pamember/queryPaMemberHT", method = RequestMethod.POST)
    public BusinessMessage queryPaMemberHT(Integer pageNo, Integer pageSize, SlPaMember slPaMember) {
        return paMemberService.queryPaMemberHT(pageNo, pageSize, slPaMember);
    }

    /**
     * 会员解绑提现账户
     * @param slUserId 搜了宝用户id
     * @return message
     */
    @PostMapping("api/pamember/unbindRelateAcct")
    @ApiOperation(value = "平安银行--会员解绑提现账户", notes = "平安银行--会员解绑提现账户")
    public BusinessMessage unbindRelateAcct(Integer slUserId) {
        return paMemberService.unbindRelateAcct(slUserId);
    }

}
